﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace lcmyjobs.Web.findjobs
{
    public partial class ListIsFristJobs : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Application["webid"] != null)
                {
                    this.Title = string.Format("{1}招聘网   {1}人才网   {1}求职网   {1}猎头网   {0}—紧急招聘信息", Application["webname"].ToString(), Application["webregion"].ToString());
                    Bind(Convert.ToInt32(Application["webid"]));

                    BindIsFrist();
                }
            }
        }

        private void BindIsFrist()
        {
            this.News_jyzd.count = 9;
            this.News_jyzd.typeid = 4;
            this.News_jyzd.linkname = "更多职业规划>>";
            this.News_jyzd.linkurl = "../article-ntid-" + 4 + ".html";
            this.News_jyzd.infourl = "../article";
            this.News_jyzd.para = "-" + 4;

        }


        private void Bind(int atid)
        {

            //int count = 0;

            //DataSet ds = new lcmyjobs.BLL.enterprise_releasejob().GetReleaseJobsByCondition("isFrist",atid, "1", this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize, out count);

            //this.AspNetPager1.RecordCount = count;


            //this.GridView1.DataSource = ds;
            //this.GridView1.DataBind();

            int c_isfrist = 0;
            int c_reward = 0;
            int c_vip = 0;
            int c_hunter = 0;
            int c_newjob = 0;
            int c_workerclass = 0;


            DataSet ds = new lcmyjobs.BLL.enterprise_releasejob().GetJobsInfo(true, false, false, false, false, false,
                                                atid, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize,
                                                out c_isfrist, out c_reward, out c_hunter, out c_vip, out c_newjob, out c_workerclass);

            this.AspNetPager1.RecordCount = c_isfrist;

            this.GridView1.DataSource = ds.Tables[0];
            this.GridView1.DataBind();


           
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            if (Application["webid"] != null)
            {
                Bind(Convert.ToInt32(Application["webid"]));
            }
               
        }

    }
}